OBJS =   classes.cmo scanner.cmo game.cmo ast.cmo parser.cmo interpret.cmo pacaml.cmo 

TARFILES = Makefile scanner.mll parser.mly \
	ast.mli myclasses.ml game.ml interpret.ml pacaml.ml \

pacaml : $(OBJS)
	ocamlc -I +lablGL lablgl.cma lablglut.cma str.cma unix.cma -o pacaml $(OBJS)
	
scanner.ml : scanner.mll
	ocamllex scanner.mll	
	
parser.ml parser.mli : parser.mly
	ocamlyacc parser.mly

game.cmo: classes.cmo game.ml
	ocamlc -I +lablGL lablgl.cma lablglut.cma str.cma unix.cma classes.cmo game.ml

%.cmo : %.ml
	ocamlc -c $<
	
%.cmi : %.mli
	ocamlc -c $<	


clean :
	rm -f pacaml parser.ml parser.mli scanner.ml a.out *.cmo *.cmi	


ast.cmo: 
ast.cmx: 
interpret.cmo: ast.cmo 
interpret.cmx: ast.cmx 
pacaml.cmo: scanner.cmo parser.cmi interpret.cmo \
    ast.cmo 
pacaml.cmx: scanner.cmx parser.cmx interpret.cmx \
    ast.cmx 
parser.cmo: ast.cmo parser.cmi 
parser.cmx: ast.cmx parser.cmi 
scanner.cmo: parser.cmi 
scanner.cmx: parser.cmx 
parser.cmi: ast.cmo 
